package com.mes.biz.domain;

import com.mes.common.annotation.Excel;
import com.mes.common.core.domain.BaseEntity;
import com.mes.common.utils.log.annotation.FieldRemark;
import com.mes.common.utils.log.annotation.LogField;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import javax.validation.constraints.NotBlank;

/**
 * 仓位管理对象 biz_warehouse_space
 * @author hwg
 * @email hwg
 * @date 2023-04-09
 */
@Data
public class BizWarehouseSpace extends BaseEntity<BizWarehouseSpace>
{
    private static final long serialVersionUID = 1L;

    /** 所属仓库 */
    @Excel(name = "所属仓库", dictType = "is_active")
    @NotBlank(message = "所属仓库不允许为空")
    @LogField
    @FieldRemark(name = "所属仓库",field = "warehouseId")
    private String warehouseId;

    /** 面积 */
    @Excel(name = "面积")
    @LogField
    @FieldRemark(name = "面积",field = "area")
    private String area;

    /** 位置 */
    @Excel(name = "位置")
    @LogField
    @FieldRemark(name = "位置",field = "postion")
    private String postion;

    /** 排序 */
    @Excel(name = "排序")
    @LogField
    @FieldRemark(name = "排序",field = "sortNumber")
    private Integer sortNumber;

    /** 租户id */
    @Excel(name = "租户id")
    private String tenantId;

    private String warehouseName;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("warehouseId", getWarehouseId())
                .append("area", getArea())
                .append("postion", getPostion())
                .append("sortNumber", getSortNumber())
                .append("tenantId", getTenantId())
                .append("remark", getRemark())
                .append("id", getId())
                .append("createBy", getCreateBy())
                .append("createDept", getCreateDept())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("updateIp", getUpdateIp())
                .append("version", getVersion())
                .append("delFlag", getDelFlag())
                .toString();
    }
}
